package com.item.service;

import com.item.dao.EssenceReadStateMapper;
import com.item.dao.model.EssenceReadState;
import com.item.dao.model.EssenceReadStateExample;
import com.item.daoEx.EssenceReadStateMapperEx;

import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class EssenceReadStateService {
    @Autowired
    private EssenceReadStateMapper essenceReadStateMapper;
    
    @Autowired
    private EssenceReadStateMapperEx essenceReadStateMapperEx;

    private static final Logger logger = Logger.getLogger(EssenceReadStateService.class);

    public int countByExample(EssenceReadStateExample example) {
        return this.essenceReadStateMapper.countByExample(example);
    }

    public EssenceReadState selectByPrimaryKey(String id) {
        return this.essenceReadStateMapper.selectByPrimaryKey(id);
    }

    public List<EssenceReadState> selectByExample(EssenceReadStateExample example) {
        return this.essenceReadStateMapper.selectByExample(example);
    }

    public int deleteByPrimaryKey(String id) {
        return this.essenceReadStateMapper.deleteByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(EssenceReadState record) {
        return this.essenceReadStateMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(EssenceReadState record) {
        return this.essenceReadStateMapper.updateByPrimaryKey(record);
    }

    public int deleteByExample(EssenceReadStateExample example) {
        return this.essenceReadStateMapper.deleteByExample(example);
    }

    public int updateByExampleSelective(EssenceReadState record, EssenceReadStateExample example) {
        return this.essenceReadStateMapper.updateByExampleSelective(record, example);
    }

    public int updateByExample(EssenceReadState record, EssenceReadStateExample example) {
        return this.essenceReadStateMapper.updateByExample(record, example);
    }

    public int insert(EssenceReadState record) {
        return this.essenceReadStateMapper.insert(record);
    }

    public int insertSelective(EssenceReadState record) {
        return this.essenceReadStateMapper.insertSelective(record);
    }
    
    public int getUnReadCount(Map<?,?> map){
    	return this.essenceReadStateMapperEx.getUnReadCount(map);
    }
}